#include "dialog.h"
#include "ui_dialog.h"
#include<QPainter>

Dialog::Dialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::Dialog)
{
    ui->setupUi(this);
}

Dialog::~Dialog()
{
    delete ui;
}

void Dialog::paintEvent(QPaintEvent *)
{
    QPainter painter(this);
//   // painter.drawLine(0,0,100,100);
//    QPen pen;
//    pen.setColor(QColor(255,0,0));
//    QBrush brush(QColor(0,255,0,125));
//    QPen pen(Qt::DotLine);
//    QBrush brush(Qt::blue);
//    brush.setStyle(Qt::HorPattern);
//    painter.setPen(pen);
//    QLinearGradient  qLinearGradient(100,150,300,150);

//    qLinearGradient.setColorAt(0,Qt::red);
//    qLinearGradient.setColorAt(0.2,Qt::black);
//    qLinearGradient.setColorAt(0.4,Qt::yellow);
//    qLinearGradient.setColorAt(0.6,Qt::white);
//    qLinearGradient.setColorAt(0.8,Qt::green);
//    qLinearGradient.setColorAt(1,Qt::blue);
    QRadialGradient radialGradient(200,100,100,200,100);
    radialGradient.setColorAt(0,Qt::black);
    radialGradient.setColorAt(1,Qt::red);
    painter.setBrush(radialGradient);
    painter.drawEllipse(100,0,200,200);

}
